
/*

CommandHistory

To hold history of all previous commands and be able to rebuild Records on undo/redo.

*/
#ifndef _COMMANDHISTORY_h_
#define _COMMANDHISTORY_h_


#include "main.h"
#include "command.h"

class CommandHistory{
private:
	//records taskRecords;
	vector<Cmd*> commandRecords;
	int numCommand;

public:

	// @author A0105541U
	CommandHistory();

	// @author A0105541U
	void addCommand(Cmd* givenCommand);
	bool undo(int num);
	bool redo(int num);//Redo n commands

	// @author A0105541U
	Cmd* getCommand(int index);

	int getNumCommand();

};

#endif